package controller;

import entity.LanguageCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import service.LanguageService;

import java.util.List;

/**
 * @Description
 * @Author 李楚鹏
 * @Date 2025/1/2 上午9:29
 **/
@Controller
@RequestMapping("/main/user")
public class LangageController {
    @Autowired
    private LanguageService languageService;

    @GetMapping("/page")
    public String page(Model model) {
        List<LanguageCategory> page = languageService.findAll();
        model.addAttribute("page", page);
        return "index";
    }

}
